'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;


  router.get('/api/page', controller.home.page)
  router.get('/api/search', controller.home.search)
  router.post('/api/add', controller.home.add)
  router.post('/api/update/:id', controller.home.update)
  router.delete('/api/delete/:id', controller.home.delete)
  router.delete('/api/deleteAll/:ids', controller.home.deleteAll)
  router.get('/api/findAll', controller.home.findAll)
  
  router.post('/api/login', controller.home.login)
  router.post('/api/register', controller.home.register)

  router.get('/api/url', controller.home.url)
};
